home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 83
/
(Vol 83) My Disc.iso
/
Games
/
drying.swf
/
scripts
/
frame_132
/
PlaceObject2_181_639
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2008-08-08
|
962b
|
49 lines
onClipEvent(enterFrame){
if(this.state != "ride" && this.state != "hold")
{
this._x += (_root._xmouse - this._x) / 2;
this._y += (_root._ymouse - this._y) / 2;
}
if(this._x < _root._xmouse)
{
this._xscale = Math.abs(this._xscale);
}
else
{
this._xscale = - Math.abs(this._xscale);
}
if(this._x < 20)
{
this._x = 20;
}
if(this._x > 354)
{
this._x = 354;
}
if(this._y < 180)
{
this._y = 180;
}
if(this._y > 260)
{
this._y = 260;
}
if(Math.sqrt(this._x - this.bx ^ 2 + (this._y - this.by) ^ 2) < 1)
{
if(this.state == "cloth")
{
this["mc" + this.state].gotoAndStop("fl" + this.clothnum);
}
else
{
this["mc" + this.state].gotoAndStop(1);
}
}
else
{
this["mc" + this.state].play();
}
this.bx = this._x;
this.by = this._y;
}